package com.payment.web.controller.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.payment.common.base.AjaxResult;
import com.payment.common.page.TableDataInfo;
import com.payment.common.utils.ExcelUtil;
import com.payment.framework.web.base.BaseController;
import com.payment.system.domain.MerchantMonth;
import com.payment.system.service.IMerchantMonthService;


/**
 * 月统计 信息操作处理
 * 
 * @author payment
 * @date 2019-03-07
 */
@Controller
@RequestMapping("/system/merchantMonth")
public class MerchantMonthController extends BaseController
{
	
	@Autowired
	private IMerchantMonthService merchantMonthService;
	

	
	/**
	 * 查询月统计列表
	 */
	@PostMapping("/list")
	@ResponseBody
	public TableDataInfo list(MerchantMonth merchantMonth)
	{
		startPage();
        List<MerchantMonth> list = merchantMonthService.selectMerchantMonthList(merchantMonth);
		return getDataTable(list);
	}
	
	
	/**
	 * 导出月统计列表
	 */
    @PostMapping("/export")
    @ResponseBody
    public AjaxResult export(MerchantMonth merchantMonth)
    {
    	List<MerchantMonth> list = merchantMonthService.selectMerchantMonthList(merchantMonth);
        ExcelUtil<MerchantMonth> util = new ExcelUtil<MerchantMonth>(MerchantMonth.class);
        return util.exportExcel(list, "merchantMonth");
    }



	

	
}
